home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Processes / ProcessError.h < prev    next >
Text File  |  2000-06-23  |  392b  |  25 lines

  1. // ProcessError.h
  2.  
  3. #ifndef ProcessError_h
  4. #define ProcessError_h
  5.  
  6. #ifndef OSError_h
  7. #include "OSError.h"
  8. #endif
  9.  
  10. class ProcessError: public OSError
  11.   {
  12.     public:
  13.         ProcessError()                                            {}
  14.         ProcessError( OSErr e )            : OSError( e )    {}
  15.         ProcessError( OSError& e )        : OSError( e )    {}
  16.   };
  17.  
  18. inline void ThrowProcessError( OSErr e )
  19.   {
  20.     if ( e != noErr )
  21.         throw ProcessError(e);
  22.   }
  23.  
  24. #endif
  25.